package com.dzl.shoppingCart.service;

import com.dzl.base.service.BaseService;
import com.dzl.shoppingCart.pojo.WelfareUserShoppingCart;
import com.dzl.shoppingCart.pojo.query.WelfareUserShoppingCartQuery;
import com.dzl.shoppingCart.pojo.vo.WelfareUserShoppingCartSupplierListVo;
import com.dzl.shoppingCart.pojo.vo.WelfareUserShoppingCartSupplierVo;
import com.dzl.shoppingCart.pojo.vo.WelfareUserShoppingCartVo;

import java.util.List;

/**
 * 小程序用户购物车(WelfareUserShoppingCart)表服务接口
 * @author ChenLong
 * @since 2021-05-20 11:33:08
 */
public interface WelfareUserShoppingCartService extends BaseService<WelfareUserShoppingCart> {

    /**
     * 删除购物车商品
     * @param id 购物车id
     * @param id 用户id
     * @return boolean
     * @author ChenLong
     * @since 2021-05-20 14:26:03
     **/
    boolean deleteById(Integer id,Integer userId);

    /**
     * 删除购物车商品
     * @param idList 行id列表
     * @return boolean
     * @author ChenLong
     * @since 2021-05-20 14:26:03
     **/
    boolean deleteBatchByIdList(List<Integer> idList,Integer userId);

    /**
     * 获取用户购物车商品信息
     * @param query 购物车查询实体类
     * @return java.util.List<com.dzl.usercart.entity.vo.WelfareUserShoppingCartVo>
     * @author ChenLong
     * @since 2021-05-20 14:26:20
     **/
    List<WelfareUserShoppingCartVo> getUserCartGoodsList(WelfareUserShoppingCartQuery query);

    /**
     * 获取用户购物车商品信息（以供应商纬度）
     * @param query 购物车查询实体类
     * @return java.util.List<com.dzl.usercart.entity.vo.WelfareUserShoppingCartVo>
     * @author ChenLong
     * @since 2021-05-20 14:26:20
     **/
    List<WelfareUserShoppingCartSupplierListVo> getUserCartGoodsListGroupBySupplier(WelfareUserShoppingCartQuery query);

    /**
     * 获取用户购物车选择的商品信息(以供应商纬度分组)
     * @param list 购物车id的list
     * @return java.util.List
     * @author ChenLong
     * @since 2021-05-20 14:26:20
     **/
    WelfareUserShoppingCartSupplierVo getUserCartGoodsListGroupBySupplierByIdList(List<Integer> list,String area);
}
